<template>
  <div>
    <a-form @submit="handleForm" class="flex">
      <a-input class="w-1/2" placeholder="请输入" v-model:value="formCode" />
      <a-button type="primary" html-type="submit">
        <Icon icon="fluent:add-12-filled" /> 查询
      </a-button>
    </a-form>
    <pre>{{ content }}</pre>
  </div>
</template>
<script lang="ts">
  export default defineComponent({
    name: 'ViewsDingdingOavoucherOaFormQuery',
  });
</script>
<script lang="ts" setup>
  import { defineComponent, ref } from 'vue';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { voucherFieldsList } from '/@/api/dingding/oavoucher/voucherFields';

  const { t } = useI18n('sys.config');
  const formCode = ref('');
  const content = ref('');
  const handleForm = () => {
    voucherFieldsList({ formCode: formCode.value }).then((res) => {
      console.log(res);
      content.value = res.data;
    });
  };
</script>
